package com.example.netty;

import io.netty.bootstrap.ServerBootstrap;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.nio.NioEventLoop;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.channel.socket.SocketChannel;
import io.netty.channel.socket.nio.NioServerSocketChannel;

/**
 * @author zp
 * @program netty
 * @description
 * @create 2019-07-17 22:59
 **/
public class NettyServer {
    public static void main(String[] args) {
        ServerBootstrap serverBootstrap=new ServerBootstrap();
        NioEventLoopGroup bossGrop=new NioEventLoopGroup();
        NioEventLoopGroup workerGroup =new NioEventLoopGroup();

        serverBootstrap.group(bossGrop,workerGroup)
                .channel(NioServerSocketChannel.class)
                .childHandler(new ChannelInitializer<SocketChannel>() {
                    @Override
                    protected void initChannel(SocketChannel socketChannel){

                    }
                }).bind(8080);
    }
}
